// 获取节点
var inputs = document.getElementsByTagName("input");
console.log(inputs);
//①先 获取input框里面的值 方法 节点.value
var inpTel = inputs[0].value;
var inpVerify = inputs[1].value;
console.log(inpVerify);
var inptelFT;
var inpVerifyFT;
//②js判断
    inputs[0].onblur = function(){
        var tel = /^1[34578][0-9]{9}$/;
        if(tel.test(this.value)){
            alert("手机号码正确");
            inputs[1].disabled=false;
            inptelFT = true;
        }else{
            alert("手机号码输入不正确，请重新输入");
            inputs[1].disabled="disabled";
            inptelFT = false;
        }
    }
    inputs[1].onblur = function(){
        var inpVerify = /^[0-9]{6}$/;
        console.log(this.value);
        if(inputs[1].value == ""){
            console.log("验证码不能为空");
            inputs[1].style.background = "red";
            inpVerifyFT = false;
        }else if(inpVerify.test(this.value)){
            inputs[1].style.background = "#fff";
            alert("验证码输入正确");
            inpVerifyFT = true;
        }else{
            inputs[1].style.background = "red";
            console.log("验证码不正确");
            inpVerifyFT = false;
        }
}
inputs[3].onclick = function(){
        if(inptelFT == false || inpVerifyFT == false){
            alert("提交失败");
        }else{
            alert("提交成功");
        }
}



